Imports System.Xml.Serialization

#Region " WikiPage Class "

Public Class WikiPage

#Region " Fields "

    Private m_Site As WikiSite
    Private m_Title As String
    Private m_Body As String
    Private m_EditDate As Date
    Private m_EditUser As String
    Private m_EditMinor As Boolean
    Private m_EditComment As String
    Private m_RevisionId As Integer

#End Region

#Region " Constructors "

    Public Sub New()
        Me.New(Nothing, Nothing, Nothing)
    End Sub

    Friend Sub New(ByVal site As WikiSite, ByVal title As String)
        Me.New(site, title, Nothing)
    End Sub

    Friend Sub New(ByVal site As WikiSite, ByVal title As String, ByVal body As String)
        MyBase.New()
        ' copy the parameters locally
        m_Site = site
        m_Title = title
        m_Body = body
        m_RevisionId = -1
    End Sub

#End Region

#Region " Propreties "

    <XmlIgnore()> _
    Public Property Site() As WikiSite
        Get
            Return m_Site
        End Get
        Set(ByVal Value As WikiSite)
            m_Site = Value
        End Set
    End Property

    Public Property Title() As String
        Get
            Return m_Title
        End Get
        Set(ByVal Value As String)
            m_Title = Title
        End Set
    End Property

    Public Property Body() As String
        Get
            Return m_Body
        End Get
        Set(ByVal Value As String)
            m_Body = Value
        End Set
    End Property

    Public Property EditDate() As Date
        Get
            Return m_EditDate
        End Get
        Set(ByVal Value As Date)
            m_EditDate = Value
        End Set
    End Property

    Public Property EditUser() As String
        Get
            Return m_EditUser
        End Get
        Set(ByVal Value As String)
            m_EditUser = Value
        End Set
    End Property

    Public Property EditMinor() As Boolean
        Get
            Return m_EditMinor
        End Get
        Set(ByVal Value As Boolean)
            m_EditMinor = Value
        End Set
    End Property

    Public Property EditComment() As String
        Get
            Return m_EditComment
        End Get
        Set(ByVal Value As String)
            m_EditComment = Value
        End Set
    End Property

    Public Property RevisionId() As Integer
        Get
            Return m_RevisionId
        End Get
        Set(ByVal Value As Integer)
            m_RevisionId = Value
        End Set
    End Property

#End Region

End Class

#End Region
